<template>
  <div id="app" class="app">
    <div class="main-container">
      <router-view v-if="isRouterAlive"></router-view>
    </div>
  </div>
</template>

<script>

export default {
  provide () {
    return {
      reload: this.reload
    }
  },
  data () {
    return {
      isRouterAlive: true
    }
  },
  methods: {
    reload () {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
</script>

<style scoped lang="stylus" rel="stylus">
.app
  height 100%
  .main-container
    height 100%
    min-width 1220px
    position relative
    margin 0 auto
</style>
